package com.imay.live.adapter.normal;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.imay.live.R;
import com.imay.live.model.NoticeModel;
import com.imay.live.utils.GlideUtil;

import java.util.List;


/**
 * Created by  nick on 2017/4/21 0021.
 * 通知里面的gradView
 */

public class NoticeFeedsAdapter extends CommonBaseAdapter {

    public NoticeFeedsAdapter(List data, Context context) {
        super(data, context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        NoticeModel.NoticeFeedModel model = (NoticeModel.NoticeFeedModel) data.get(position);
        if (convertView==null){
            convertView = inflater.inflate(R.layout.item_notice_feeds,null);
        }
        ImageView iv_notice_feed = ViewHolder.get(convertView,R.id.iv_notice_feed);
        GlideUtil.loadImage(iv_notice_feed, model.getUrl());



        return convertView;
    }
}
